package com.bckj.fastboot.upms.api.service;

import com.bckj.fastboot.core.lang.model.PageResult;
import com.bckj.fastboot.upms.api.constant.UpmsConstant;
import com.bckj.fastboot.upms.api.dto.SysParamQuery;
import com.bckj.fastboot.upms.api.dto.SysParamRequest;
import com.bckj.fastboot.upms.api.entity.SysParam;
import com.bckj.fastboot.upms.api.vo.SysParamVO;
import org.springframework.cloud.openfeign.FeignClient;

import org.springframework.web.bind.annotation.*;


import java.util.List;

/**
 * 系统参数表(SysParam)remote
 *
 * @author wfc
 * @since 2023-09-09 10:48:14
 */
@FeignClient(value = UpmsConstant.SERVICE_ID, contextId = "sysParam", path = "/sysParam")
public interface SysParamRemoteService {

    /**
	 * 列表(分页)
	 *
	 * @param query req
	 * @return boolean
	 */
	@GetMapping("page")
	PageResult<SysParamVO> page(SysParamQuery query);
	
    /**
	 * 列表
	 *
	 * @param query req
	 */
	@GetMapping("list")
	List<SysParamVO> list(SysParamQuery query);
	
    /**
	 * 增加
	 *
	 * @param request req
	 * @return boolean
	 */
	@PostMapping()
	boolean save(@RequestBody SysParamRequest request);

	/**
	 * 修改
	 *
	 * @param request req
	 * @return boolean
	 */
	@PutMapping()
	boolean update(@RequestBody SysParamRequest request);

	/**
	 * 移除
	 *
	 * @param id id
	 * @return boolean
	 */
	@DeleteMapping("{id}")
	boolean remove(@PathVariable Long id);

	/**
	 * 详情
	 *
	 * @param id id
	 * @return vo
	 */
	@GetMapping("{id}")
	SysParamVO details(@PathVariable Long id);

	/**
	 * 根据名称查询
	 * @param name 键名
	 * @return param
	 */
	@GetMapping("getByName")
	SysParam getByName(@RequestParam("name") String name);
}
